package trabalho.pkg3;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Teste
{
    private static NoCliente cliente;
    private static NoMaster servidor;
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        // TODO code application logic here
        cliente = new NoCliente();
        InfoArq teste = new InfoArq("teste");
        teste.setHosts("testeshasugas");
        teste.setSize(9999);
        teste.setNomeArq("teste");
        try
        {
            teste.grava();
        } catch(IOException ex)
        {
            Logger.getLogger(Teste.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        try
        {
            servidor = new NoMaster(Integer.parseInt(args[1]));
            servidor.start();
            cliente.main(args);
        } catch(ClassNotFoundException | IOException ex)
        {
            Logger.getLogger(Teste.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}